home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / util / wb / newmenu.lha / NewMenu / newmenu.h < prev    next >
C/C++ Source or Header  |  1996-09-24  |  5KB  |  128 lines

  1. #ifndef INTUITION_NEWMENU_H
  2. #define INTUITION_NEWMENU_H
  3.  
  4.  
  5.  
  6. /* ======================================================================== */
  7. /* === Menu =============================================================== */
  8. /* ======================================================================== */
  9. struct ExtMenu
  10. {
  11.     struct ExtMenu *NextMenu;    /* same level */
  12.     WORD LeftEdge, TopEdge;    /* position of the select box */
  13.     WORD Width, Height;     /* dimensions of the select box */
  14.     UWORD Flags;        /* see flag definitions below */
  15.     BYTE *MenuName;        /* text for this Menu Header */
  16.     struct ExtMenuItem *FirstItem; /* pointer to first in chain */
  17.  
  18.     /* these mysteriously-named variables are for internal use only */
  19.     WORD JazzX, JazzY, BeatX, BeatY;
  20.  
  21.     APTR UserData;        /* ignored by Intuition */
  22.  
  23.     BYTE *HelpText;        /* help text or NULL */
  24. };
  25.  
  26.  
  27. /* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION */
  28. #define MFLG_MENUENABLED    0x0001    /* whether or not this menu is enabled */
  29. #define MFLG_NOGHOST        0x0002    /* no ghosting when disabled */
  30. #define MFLG_LAYOUT        0x0004    /* let Intuition layout this menustrip,
  31.                                          * the items and the subitems
  32.                                          *
  33.                                          * with this flag set, LeftEdge, TopEdge,
  34.                                          * Width, Height, are ignored for the
  35.                                          * Menu, MenuItem, IntuiText
  36.                                          *
  37.                                          * LeftEdge and TopEdge are ignored for
  38.                                          * the Image structures
  39.                                          *
  40.                                          */
  41. #define MFLG_HELPTEXT        0x0008    /* help text is available on this
  42.                      * menustrip, items, and subitems
  43.                      */
  44.  
  45. /* FLAGS SET BY INTUITION */
  46. #define MFLG_PRIVATE1         0x0100    /* don't touch it... (was MIDRAWN) */
  47.  
  48.  
  49.  
  50. /* ======================================================================== */
  51. /* === MenuItem =========================================================== */
  52. /* ======================================================================== */
  53. struct ExtMenuItem
  54. {
  55.     struct ExtMenuItem *NextItem; /* pointer to next in chained list */
  56.     WORD LeftEdge, TopEdge;    /* position of the select box */
  57.     WORD Width, Height;        /* dimensions of the select box */
  58.     UWORD Flags;        /* see the defines below */
  59.  
  60.     LONG MutualExclude;        /* set bits mean this item excludes that */
  61.  
  62.     APTR ItemFill;        /* points to Image, IntuiText, or NULL */
  63.  
  64.     /* when this item is pointed to by the cursor and the items highlight
  65.      * mode MIFLG_HIGHIMAGE or MIFLG_HIGHTEXT is selected, this alternate
  66.      * state will be displayed
  67.      */
  68.     APTR SelectFill;        /* points to Image, IntuiText, or NULL */
  69.  
  70.     BYTE Command;        /* only if appliprog sets the COMMSEQ flag */
  71.  
  72.     struct ExtMenuItem *SubItem; /* if non-zero, points to MenuItem for submenu */
  73.  
  74.     /* The NextSelect field represents the menu number of next selected
  75.      *    item (when user has drag-selected several items)
  76.      */
  77.     UWORD NextSelect;
  78.  
  79.     APTR UserData;        /* ignored by Intuition */
  80.  
  81.     BYTE *HelpText;        /* help text or NULL */
  82. };
  83.  
  84.  
  85. /* FLAGS SET BY THE APPLIPROG */
  86. #define MIFLG_CHECKIT        0x0001    /* set to indicate checkmarkable item */
  87. #define MIFLG_ITEMTEXT        0x0002    /* set if textual, clear if graphical item */
  88. #define MIFLG_COMMSEQ        0x0004    /* set if there's an command sequence */
  89. #define MIFLG_MENUTOGGLE    0x0008    /* set for toggling checks (else mut. exclude) */
  90. #define MIFLG_ITEMENABLED    0x0010    /* set if this item is enabled */
  91. #define MIFLG_SBAR        0x0020    /* separator bar */
  92. #define MIFLG_NOGHOST        0x0200    /* no ghosting while disabled */
  93. #define MIFLG_NEXTCOLUMN    0x0400    /* place in the next column if possible */
  94. #define MIFLG_HIGHLIGHT        0x0800    /* special color text */
  95.  
  96. /* these are the SPECIAL HIGHLIGHT FLAG state meanings */
  97. #define MIFLG_HIGHFLAGS        0x00C0    /* see definitions below for these bits */
  98. #define MIFLG_HIGHIMAGE        0x0000    /* use the user's "select Image" */
  99. #define MIFLG_HIGHCOMP        0x0040    /* highlight by complementing the selectbox */
  100. #define MIFLG_HIGHBOX        0x0080    /* highlight by "boxing" the selectbox */
  101. #define MIFLG_HIGHNONE        0x00C0    /* don't highlight */
  102.  
  103. /* FLAGS SET BY BOTH APPLIPROG AND INTUITION */
  104. #define MIFLG_CHECKED        0x0100    /* state of the checkmark */
  105.  
  106. /* FLAGS SET BY INTUITION */
  107. #define MIFLG_OBSOLETE1        0x1000    /* obsolete (was ISDRAWN) */
  108. #define MIFLG_OBSOLETE2        0x2000    /* obsolete (was HIGHITEM) */
  109. #define MIFLG_OBSOLETE3        0x4000    /* obsolete (was MENUTOGGLED) */
  110.  
  111.  
  112.  
  113. /* = MENU STUFF =========================================================== */
  114. #define NEWMENUPORTNAME         "NewLook Menu Handler"
  115. #define    IDS_MENUNORMAL        IDS_NORMAL
  116. #define    IDS_MENUHIGH        IDS_SELECTED
  117. #define    IDS_MENUDISABLED    IDS_DISABLED
  118. #define    IDS_MENUPICKEDNORMAL    IDS_INACTIVENORMAL
  119. #define    IDS_MENUPICKEDHIGH    IDS_INACTIVESELECTED
  120. #define NM_HELP            96    /* fill the nm_Label with the
  121.                      * help text for the previous
  122.                      * menu, item, or subitem
  123.                      *
  124.                      * combining this with NM_IGNORE
  125.                      * has no effect
  126.                      */
  127.  
  128. #endif /* INTUITION_NEWMENU_H */